package com.example.ccjml;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;

import com.example.ccj.b.a.BaseActivity;
import com.example.ccj.b.c.ui.NavigationPageOnTabLayout;
import com.example.ccj.b.c.ui.TableAndViewPageBean;
import com.example.ccjml.fragment.testFragment1;
import com.example.ccjml.fragment.testFragment2;

import java.util.ArrayList;
import java.util.List;

public class TestNavigationPageActivity extends BaseActivity {
    NavigationPageOnTabLayout layout;

    @Override
    public void initData(@Nullable Bundle bundle) {
//初始化viewPage
        List<TableAndViewPageBean> data = new ArrayList<>();
        data.add(new TableAndViewPageBean("主页", R.mipmap.ic_launcher_round, com.example.ccj.R.mipmap.left, new testFragment1(), null));
        data.add(new TableAndViewPageBean("我的", R.mipmap.ic_launcher, com.example.ccj.R.mipmap.right, new testFragment2(), null));

        //设置数据，底部显示，禁止滑动，默认加载方式
        layout.setData(data).isTop(false).build();
    }

    @Override
    public void doBusiness() {

    }

    @Override
    public void initView(@Nullable Bundle savedInstanceState, @Nullable View contentView) {
        layout = findViewById(R.id.activity_test_navigation_page_layout);
    }

    @Override
    public int initContentView() {
        return R.layout.activity_test_navigation_page;
    }
}